package cn.yjh.server.support;

import java.nio.ByteBuffer;
import java.nio.channels.SocketChannel;
import java.util.HashMap;
import java.util.Map;

/**
 * @DESC:
 * @AUTHOR: YouJinhua
 * @DATE: 2022-01-08 13:20:50
 * @VERSION: 1.0
 */
public final class Request {

    public Request(SocketChannel sc, ByteBuffer inputBuffer) {
        this.sc = sc;
        this.inputBuffer = inputBuffer;
    }

    protected SocketChannel sc;

    protected ByteBuffer inputBuffer;

    protected String url;

    protected String method;

    protected Map<String,String> header = new HashMap<>();

    protected Map<String,Object> params = new HashMap<>();

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getMethod() {
        return method;
    }

    public void setMethod(String method) {
        this.method = method;
    }

    public Map<String, String> getHeader() {
        return header;
    }

    public void setHeader(Map<String, String> header) {
        this.header = header;
    }

    public SocketChannel getSocketChannle() {
        return sc;
    }

    public ByteBuffer getInputBuffer() {
        return inputBuffer;
    }

    public Map<String, Object> getParams() {
        return params;
    }
}
